/**
 * tigerrad
 * fall 2006
 */

#ifndef _SCENE_H
#define _SCENE_H

#include "Util.h"
#include "Entity.h"
#include "AreaLight.h"

/*
 * 3D scene.
 */
class Scene
{
	public:
		/**
		 * Constructor.
		 */
		Scene();

		/**
		 * The viewport has been resized.
		 */
		void resize(GLuint w, GLuint h);

		/**
		 * Add an Entity to the Scene.
		 */
		void addEntity(EntityPtr e) { _entities.push_back(e); }

		/**
		 * Return the number of Entity instances in the Scene.
		 */
		unsigned int numEntities() { return _entities.size(); }

		/**
		 * Return the ith Entity.
		 */
		EntityPtr getEntity(unsigned int i) { return _entities[i]; }
		
		/**
		 * Add an AreaLight to the Scene.
		 */
		void addAreaLight(AreaLightPtr a) { _lights.push_back(a); }

		/**
		 * Return the number of AreaLight instances in the Scene.
		 */
		unsigned int numAreaLights() { return _lights.size(); }

		/**
		 * Return the ith AreaLight.
		 */
		AreaLightPtr getAreaLight(unsigned int i) { return _lights[i]; }

		/**
		 * Destructor.
		 */
		~Scene() 
		{
			// TODO
		}

	protected:
		std::vector<EntityPtr> _entities;
		std::vector<AreaLightPtr> _lights;
};

typedef boost::shared_ptr<Scene> ScenePtr;

#endif 

